﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace Camc.Quality.Migrations
{
    public partial class add_materils : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_MaterialsContents_MaterialsNodes_MaterialsNodeId",
                table: "MaterialsContents");

            migrationBuilder.DropIndex(
                name: "IX_MaterialsContents_MaterialsNodeId",
                table: "MaterialsContents");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateIndex(
                name: "IX_MaterialsContents_MaterialsNodeId",
                table: "MaterialsContents",
                column: "MaterialsNodeId");

            migrationBuilder.AddForeignKey(
                name: "FK_MaterialsContents_MaterialsNodes_MaterialsNodeId",
                table: "MaterialsContents",
                column: "MaterialsNodeId",
                principalTable: "MaterialsNodes",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);
        }
    }
}
